package win.smartown.android.utils

import android.app.Activity
import android.content.Intent
import android.os.Bundle

/**
 * Created by smartown on 2017/6/13 16:26.
 * Description:
 */
object JumpUtil {

    fun <T : Activity> startActivity(activity: Activity, activityClass: Class<T>, title: String) {
        startActivity(activity, activityClass, title, null)
    }

    fun <T : Activity> startActivity(activity: Activity, activityClass: Class<T>, title: String, bundle: Bundle?) {
        val intent = Intent(activity, activityClass)
        intent.putExtra("title", title)
        intent.putExtra("extra", bundle)
        activity.startActivity(intent)
    }

}